package com.explment.lens.controller.role;

import com.explment.lens.entity.SysRoleEntity;
import com.explment.lens.service.SysRoleService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.explment.lens.utils.result.ResultData;
/**
 * 系统角色 controller
 */
@RestController
@RequestMapping("/sysRole")
public class SysRoleController {
    @Autowired
    private SysRoleService sysRoleEntityService;

    @GetMapping("/list")
    public ResultData list() {
        return ResultData.success(sysRoleEntityService.list());
    }

    @GetMapping("/{id}")
    public ResultData getById(@PathVariable String id) {
        return ResultData.success(sysRoleEntityService.getById(id));
    }
}